home *** CD-ROM | disk | FTP | other *** search
/ Hot Super Models / Hot Super Models.iso / dos / tif / dither.h < prev    next >
Text File  |  1992-07-05  |  1KB  |  44 lines

  1. /*
  2.  * NAME dither.h - header file for Floyd-Steinberg dithering
  3.  *
  4.  * DESCRIPTION See header for dither.c.
  5.  */
  6.  
  7.  
  8. /* TYPEDEFS */
  9. typedef struct
  10. {
  11.   BYTE minIn;            /* minimum input value */
  12.   BYTE maxIn;            /* maximum input value */
  13.   BYTE minOut;            /* minimum output value */
  14.   BYTE maxOut;            /* maximum output value */
  15.   int numCols;            /* number of columns per row */
  16.   ulong scale;            /* scale factor for thresholding inflated by
  17.                  * InflateBase */
  18.   ulong invscale;        /* inverse scale factor */
  19.   int *oddRowErrs;        /* array holding odd row errors */
  20.   int *evenRowErrs;        /* array holding even row errors */
  21. } DCtrlType;
  22. /* FUNCTION PROTOTYPES */
  23. int
  24. DitherInit (
  25.          BYTE minIn,    /* minimum input value */
  26.          BYTE maxIn,    /* maximum input value */
  27.          BYTE minOut,    /* minimum output value */
  28.          BYTE maxOut,    /* maximum output value */
  29.          int numCols,    /* number of columns in each row */
  30.          DCtrlType * pCtrl    /* structure with control parameters */
  31. );
  32.      void Dither (
  33.             DCtrlType * pCtrl,    /* structure with
  34.                      * control parameters */
  35.             int *pIn,    /* input values */
  36.             int *pOut,    /* output values */
  37.             int OddRow    /* TRUE => current row
  38.                  * is odd-numbered */
  39. );
  40.      void DitherTerm (
  41.                 DCtrlType * pCtrl    /* structure with
  42.                          * control parameters */
  43. );
  44.